﻿using System;
using System.Collections.Generic;
using T.ServiceComponent.I18N.SPI;
using T.FAS.Runtime.Term.Entity;

namespace T.FAS.Runtime.Term.SGSPI
{
    public interface IPageRefService
    {
        /// <summary>
        /// 重新生成PageJS
        /// </summary>
        /// <returns></returns>
        long GetPageVerMask(string pageId, string language);
        /// <summary>
        /// 重新生成所有JS
        /// </summary>
        /// <param name="i18NID"></param>
        void RegenerationAll();
        /// <summary>
        /// 根据分支生成JS
        /// </summary>
        /// <param name="i18NID"></param>
        void RegenerationBranchJS(string branchID);
        /// <summary>
        /// 根据翻译项生成JS
        /// </summary>
        /// <param name="i18NID"></param>
        void RegenerationJS(List<string> termMappingIDs);
        /// <summary>
        /// 根据来源ID生成JS
        /// </summary>
        /// <param name="i18NID"></param>
        void RegenerationJSBySource(List<string> sourceIDs);
        /// <summary>
        /// 获取公共js新版本
        /// </summary>
        /// <returns></returns>
        long GetCommonVerMask(string language);
        /// <summary>
        /// 运行时修改词条，重新生成PageJS
        /// </summary>
        /// <returns></returns>
        Dictionary<string, string> UpdateTerms(List<CustomTerm> i18NTermItems);
        /// <summary>
        /// 运行时修改词条，重新生成PageJS 
        /// </summary>
        void UpdateTermMappings(List<I18NPageTermMapping> i18NPageTerms);
        /// <summary>
        /// 根据词条编号获取词条
        /// </summary>
        /// <returns></returns>
        I18NTerm GetTermBycode(string termCode);
        /// <summary>
        /// 根据词条编号集合获取词条集合
        /// </summary>
        /// <returns></returns>
        List<I18NPageTermMapping> GetTermsBycodes(List<string> termCodeList);
    }
}
